<?php /* Smarty version Smarty-3.1.18, created on 2015-07-10 23:34:47
         compiled from "D:\WWW\yf_qiaqia\Admin\View\Goods\goods.html" */ ?>
<?php /*%%SmartyHeaderCode:9164559fe617cf5a50-78873931%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '076b1fca5f971dc55f054f491a2882e88f9e282a' => 
    array (
      0 => 'D:\\WWW\\yf_qiaqia\\Admin\\View\\Goods\\goods.html',
      1 => 1431527071,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '9164559fe617cf5a50-78873931',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    '_C' => 0,
    'art' => 0,
    'type_list' => 0,
    'item' => 0,
    'attr' => 0,
    'cat_list' => 0,
    'list' => 0,
    '_GET' => 0,
    'brands_list' => 0,
    'flag' => 0,
    'photo' => 0,
    'val' => 0,
    'id' => 0,
    'action' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_559fe618299603_07191408',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_559fe618299603_07191408')) {function content_559fe618299603_07191408($_smarty_tpl) {?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/amazeui.min.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/hy.admin.css"/>
	</head>
	<body>
	<div class="am-g">
		 <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

		<div class="am-tabs am-margin"  data-am-tabs="{ noSwipe: 1}">
    <ul class="am-tabs-nav am-nav am-nav-tabs">
      <li class="am-active"><a hidefocus="true" href="#tab1">基本详情</a></li>
       <?php if ($_smarty_tpl->tpl_vars['_C']->value['DIGLOSSIA']==1) {?>
       <li><a hidefocus="true" href="#tab4">英文详情</a></li>
       <?php }?>
       <li class=""><a hidefocus="true" href="#tab2">高级选项</a></li>
      <li class=""><a hidefocus="true" href="#tab6">商品规格</a></li>
      <li class=""><a hidefocus="true" href="#tab7">商品属性</a></li>
      <li class=""><a hidefocus="true" href="#tab5">相册集</a></li>
      <li class=""><a hidefocus="true" href="#tab8">关联商品</a></li>
      <li class=""><a hidefocus="true" href="#tab3">SEO 选项</a></li>
    </ul>


    <form class="am-tabs-bd am-form hy-js-form"  style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
      
      <div class="am-tab-panel am-fade am-active am-in" id="tab1">
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              商品名称
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input type="text" name="goods_name" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['goods_name'];?>
" class="am-input-sm">
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              商品简介
            </div>
            <div class="am-u-sm-4 am-u-end">
               <textarea rows="3" name="goods_brief" placeholder=""><?php echo $_smarty_tpl->tpl_vars['art']->value['goods_brief'];?>
</textarea>
            </div>
          </div>

          <div class="am-g am-margin-top-sm">
            <div class="am-u-sm-2 am-text-right">
              内容详情
            </div>
            <div class="am-u-sm-10">
              <textarea class="hy-kindeditor" name="goods_desc" rows="10" placeholder=""><?php echo $_smarty_tpl->tpl_vars['art']->value['goods_desc'];?>
</textarea>
            </div>
          </div>
      </div>
      <div class="am-tab-panel am-fade" id="tab4">
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              商品名称
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input type="text" name="en_name" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['en_name'];?>
" class="am-input-sm">
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              商品简介
            </div>
            <div class="am-u-sm-4 am-u-end">
               <textarea rows="3" name="en_brief" placeholder=""><?php echo $_smarty_tpl->tpl_vars['art']->value['en_brief'];?>
</textarea>
            </div>
          </div>

          <div class="am-g am-margin-top-sm">
            <div class="am-u-sm-2 am-text-right">
              内容详情
            </div>
            <div class="am-u-sm-10">
              <textarea class="hy-kindeditor" name="en_desc" rows="10" placeholder=""><?php echo $_smarty_tpl->tpl_vars['art']->value['en_desc'];?>
</textarea>
            </div>
          </div>
      </div>
       <div class="am-tab-panel am-fade " id="tab6">
       	  <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
       商品类型
            </div>
            <div class="am-u-sm-4 am-u-end">
              <select class="hy-js-selecttype" name="goods_type">
              	<option value="0">请选择商品类型</option>
              	<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['type_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->_loop = true;
?>
              		<option <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_type']==$_smarty_tpl->tpl_vars['item']->value['id']) {?>selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['item']->value['type_name'];?>
</option>
              	<?php } ?>
              </select>
            </div>
          </div>
          <div class="hy-js-specarea">
          	<?php echo $_smarty_tpl->tpl_vars['art']->value['spec'];?>

          </div>
       </div>
        <div class="am-tab-panel am-fade" id="tab7">
      	  <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-u-end">
             <button class="am-btn am-btn-primary am-btn-xs hy-js-selectattr" >选择公共属性</button>      
            </div>
          </div>
          
          	<div class="am-tabs am-margin"  data-am-tabs="{ noSwipe: 1}">
					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a hidefocus="true">基本详情</a>
						</li>
					</ul>
					<div class="am-tabs-bd ">
                        <div class="am-tab-panel am-fade  am-active am-in">
							<table class="am-table am-table-striped am-table-hover hy-table-main">
								<thead>
									<tr>
										<th class="table-title">分组</th>
										<th class="table-type">名称</th>
										<th class="table-date">图片</th>
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody class="hy-js-attrdata">
									<?php  $_smarty_tpl->tpl_vars['attr'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['attr']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['art']->value['attr_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['attr']->key => $_smarty_tpl->tpl_vars['attr']->value) {
$_smarty_tpl->tpl_vars['attr']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['attr']->key;
?>
									<tr>
										<td>
											<?php echo $_smarty_tpl->tpl_vars['attr']->value['name'];?>

										</td>
										<td>
											<?php echo $_smarty_tpl->tpl_vars['attr']->value['attr_name'];?>

										</td>
										<td>
											<div class="am-u-sm-4">
												<input type="text" name="attr_goods_img" class="am-input-sm attr-img" value="<?php echo $_smarty_tpl->tpl_vars['attr']->value['goods_img'];?>
">
											</div>
											<div class="am-u-sm-2">
												<img id="hy-thumb"  style="height: 30px;" <?php if ($_smarty_tpl->tpl_vars['attr']->value['goods_img']) {?>src="<?php echo $_smarty_tpl->tpl_vars['attr']->value['goods_img'];?>
" <?php } else { ?> src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/logo2.png" <?php }?>>
											</div>
											<div class="am-u-sm-4 am-u-end">
												<button class="am-btn am-btn-primary am-btn-xs hy-js-attrimg">上传</button>
											</div>
										</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													<input type="hidden" name="goods_attr_id" id="goods_attr_id" value="<?php echo $_smarty_tpl->tpl_vars['attr']->value['id'];?>
" />
													<button data-param="{ url:'index.php?g=admin&m=goods&a=del_goods_attr&id=<?php echo $_smarty_tpl->tpl_vars['attr']->value['id'];?>
',hide:4}"class="am-btn am-btn-default am-btn-xs am-text-danger hy-js-del"><span class="am-icon-trash-o"></span> 删除</button>
												</div>
											</div>
										</td>
									</tr>
									<?php } ?>
								</tbody>
							</table>
						</div>
					</div>
			</div>
      </div>
      <div class="am-tab-panel am-fade " id="tab2">
      	<div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
             分类
            </div>
            <div class="am-u-sm-4 am-u-end">
             <select name="cat_id">
             	<option value="0">请选择商品分类</option>
             	<?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value) {
$_smarty_tpl->tpl_vars['list']->_loop = true;
?> 
               <option <?php if ($_smarty_tpl->tpl_vars['art']->value['cat_id']==$_smarty_tpl->tpl_vars['list']->value['id']) {?> selected="selected"<?php } elseif ($_smarty_tpl->tpl_vars['list']->value['id']==$_smarty_tpl->tpl_vars['_GET']->value['c']) {?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['list']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['list']->value['name'];?>
</option>
              <?php } ?>  
             </select>
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
             品牌
            </div>
            <div class="am-u-sm-4 am-u-end">
             <select name="brand_id">
             	<option value="0">请选择所属品牌</option>
             	<?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['brands_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value) {
$_smarty_tpl->tpl_vars['list']->_loop = true;
?> 
               <option <?php if ($_smarty_tpl->tpl_vars['art']->value['brand_id']==$_smarty_tpl->tpl_vars['list']->value['id']) {?> selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['list']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['list']->value['brand_name'];?>
</option>
              <?php } ?>
             </select>
            </div>
          </div>
      	<div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              原价/现价
            </div>
            <div class="am-u-sm-1">
              ￥<input type="text" name="market_price" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['market_price'];?>
" class="am-input-sm">
            </div>
            <div class="am-u-sm-1 am-u-end">
              ￥<input type="text" name="shop_price" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['shop_price'];?>
" class="am-input-sm">
            </div>
          </div>
          
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
             库存
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input type="text" name="goods_num" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['goods_num'];?>
" class="am-input-sm">
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
           商品货号
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input type="text" name="goods_sn" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['goods_sn'];?>
" class="am-input-sm">
            </div>
          </div>
         
        
        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">推荐类型</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button>
            	
              <label class="am-btn am-btn-default am-btn-xs <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==0) {?>am-active<?php }?><?php } ?>">
                <input type="checkbox" name="recommend_type" value="0" <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==0) {?>checked="checked"<?php }?><?php } ?> > 新品
              </label>
              <label class="am-btn am-btn-default am-btn-xs <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==1) {?>am-active<?php }?><?php } ?>">
                <input type="checkbox" name="recommend_type" value="1"  <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==1) {?>checked="checked"<?php }?><?php } ?> > 热门
              </label>
              <label class="am-btn am-btn-default am-btn-xs <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==2) {?>am-active<?php }?><?php } ?> ">
                <input type="checkbox" name="recommend_type" value="2"  <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==2) {?>checked="checked"<?php }?><?php } ?> > 推荐
              </label>
              <label class="am-btn am-btn-default am-btn-xs <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==3) {?>am-active<?php }?><?php } ?>">
                <input type="checkbox" name="recommend_type" value="3"  <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==3) {?>checked="checked"<?php }?><?php } ?>> 首页
              </label>
              <label class="am-btn am-btn-default am-btn-xs <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==4) {?>am-active<?php }?><?php } ?>">
                <input type="checkbox" name="recommend_type" value="4"  <?php  $_smarty_tpl->tpl_vars['flag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['flag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['recommend_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['flag']->key => $_smarty_tpl->tpl_vars['flag']->value) {
$_smarty_tpl->tpl_vars['flag']->_loop = true;
?> <?php if ($_smarty_tpl->tpl_vars['flag']->value==4) {?>checked="checked"<?php }?><?php } ?> > 其他
              </label>
            </div>
          </div>
        </div>
        <div class="am-g am-margin-top">
          <div class="am-u-sm-2 am-text-right">显示状态</div>
          <div class="am-u-sm-10">
            <div class="am-btn-group" data-am-button="">
              <label class="am-btn am-btn-default am-btn-xs <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']) {?><?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']==1) {?>am-active<?php } else { ?><?php }?><?php } else { ?>am-active<?php }?>  ">
                <input type="radio"  <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']) {?><?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']==1) {?>checked="checked"<?php } else { ?><?php }?><?php } else { ?>checked="checked"<?php }?>  name="status"  value="1" id="option1"> 显示
              </label>
              <label class="am-btn am-btn-default am-btn-xs <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']) {?><?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']==2) {?>am-active<?php } else { ?><?php }?><?php } else { ?><?php }?>">
                <input type="radio" <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']) {?><?php if ($_smarty_tpl->tpl_vars['art']->value['goods_status']==2) {?>checked="checked"<?php } else { ?><?php }?><?php } else { ?><?php }?> name="status" value="2" id="option2"> 不显示
              </label>
            </div>
          </div>
        </div>
      
 <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              缩略图
            </div>
            <div class="am-u-sm-4">
              <input type="text" name="goods_thumb" class="am-input-sm  thumb" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['goods_thumb'];?>
">
             
            </div>
            <div class="am-u-sm-1">
            	 <img id="hy-thumb" class="hy-js-cutimg" style="height: 30px;" <?php if ($_smarty_tpl->tpl_vars['art']->value['goods_thumb']) {?>src="<?php echo $_smarty_tpl->tpl_vars['art']->value['goods_thumb'];?>
"<?php } else { ?> src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/logo2.png" <?php }?>>
            	</div>
             <div class="am-u-sm-4 am-u-end">
             	<button class="am-btn am-btn-primary am-btn-xs hy-js-uploadimg" >上传</button>
          </div>
             </div>
               <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
              微店二维码
            </div>
            <div class="am-u-sm-4">
              <input type="text" name="weixin_chain" class="am-input-sm  thumb" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['weixin_chain'];?>
">
             
            </div>
            <div class="am-u-sm-1">
            	 <img id="hy-thumb"  style="height: 30px;" <?php if ($_smarty_tpl->tpl_vars['art']->value['weixin_chain']) {?>src="<?php echo $_smarty_tpl->tpl_vars['art']->value['weixin_chain'];?>
"<?php } else { ?> src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/logo2.png" <?php }?>>
            	</div>
             <div class="am-u-sm-4 am-u-end">
             	<button class="am-btn am-btn-primary am-btn-xs hy-js-uploadimg" >上传</button>
          </div>
             </div>
             <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
           外部链接
            </div>
            <div class="am-u-sm-4 am-u-end">
            	<textarea placeholder="多条链接请用回车分开" name="external_chain" rows="3" cols=""><?php echo $_smarty_tpl->tpl_vars['art']->value['external_chain'];?>
</textarea>
            </div>
          </div>
      </div>
      <div class="am-tab-panel am-fade" id="tab5">
      	    <button class="am-btn am-btn-primary am-btn-xs hy-js-uploadimg2" >上传</button>
      	   <ul id="hy-img-ul">
      	   	<?php  $_smarty_tpl->tpl_vars['photo'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['photo']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['art']->value['photo']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['photo']->key => $_smarty_tpl->tpl_vars['photo']->value) {
$_smarty_tpl->tpl_vars['photo']->_loop = true;
?>
      	   	<li class="hy-img-li">
      	   		<div  class="hy-img-container am-text-right "><span data-param ="{ url:'index.php?g=admin&m=goods&a=del_gallery&id=<?php echo $_smarty_tpl->tpl_vars['photo']->value['id'];?>
',hide:2}" class="hy-js-del am-icon-close"></span><img data-href="index.php?g=admin&m=article&a=edit_photo&pid=<?php echo $_smarty_tpl->tpl_vars['photo']->value['id'];?>
" class="hy-js-img" title="<?php echo $_smarty_tpl->tpl_vars['photo']->value['title'];?>
" alt="<?php echo $_smarty_tpl->tpl_vars['photo']->value['title'];?>
" width="100%" src="<?php echo $_smarty_tpl->tpl_vars['photo']->value['original_pic'];?>
"/></div>
      	   	</li>
      	   	<?php } ?>
      	   </ul>
      </div>
      <div class="am-tab-panel am-fade" id="tab8">
       	 <div class="am-g am-margin-top">
       	 	  <div class="am-u-sm-2">
       	 	  	 <select class="hy-js-brand">
             	<option value="0">请选择所属品牌</option>
             	<?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['brands_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value) {
$_smarty_tpl->tpl_vars['list']->_loop = true;
?> 
               <option  value="<?php echo $_smarty_tpl->tpl_vars['list']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['list']->value['brand_name'];?>
</option>
              <?php } ?>
             </select>
 <select class="hy-js-catid">
             	<?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value) {
$_smarty_tpl->tpl_vars['list']->_loop = true;
?> 
               <option value="<?php echo $_smarty_tpl->tpl_vars['list']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['list']->value['name'];?>
</option>
              <?php } ?>  
             </select>
       	 	  	  
       	 	  </div>
       	 	  <div class="am-u-sm-2">
       	 	  	   <input type="text" class="am-input-sm hy-js-keywords" value="">
       	 	  </div>
            <div class="am-u-sm-2 am-u-end">
             <button class="am-btn am-btn-primary am-btn-xs hy-js-searchgoods" >搜索</button>      
            </div>
          </div>
          
          	<div class="am-tabs am-margin"  data-am-tabs="{ noSwipe: 1}">
					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a hidefocus="true">基本详情</a>
						</li>
					</ul>
					<div class="am-tabs-bd ">
                        <div class="am-tab-panel am-fade  am-active am-in">
							<table class="am-table am-table-striped am-table-hover hy-table-main">
								<thead>
									<tr>
										<th class="table-title">商品名称</th>
										<th class="table-type">价格</th>
										<th class="table-date">库存</th>
										
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody class="hy-js-linkarea">
									
								</tbody>
								<tbody>
									<?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['art']->value['link_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
									<tr>
										<td>
											<?php echo $_smarty_tpl->tpl_vars['val']->value['goods_name'];?>

										</td>
										<td>
											<?php echo $_smarty_tpl->tpl_vars['val']->value['shop_price'];?>

										</td>
										<td>
											<?php echo $_smarty_tpl->tpl_vars['val']->value['goods_num'];?>

										</td>
										<td>
											<div class="am-btn-group" data-am-button="">
              <label class="am-btn am-btn-default am-btn-xs am-active  ">
                <input type="checkbox"  checked="checked"  name="update_links"  value="<?php echo $_smarty_tpl->tpl_vars['val']->value['id'];?>
" id="option1"> 关联
              </label>
              
                                         </div>
										</td>
									</tr>
									<?php } ?>
								</tbody>
							</table>
						</div>
					</div>
			</div>
      </div>
      <div class="am-tab-panel am-fade" id="tab3">
          <div class="am-g am-margin-top-sm">
            <div class="am-u-sm-2 am-text-right">
              SEO 标题
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input type="text" name="page_title" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['page_title'];?>
" class="am-input-sm">
            </div>
          </div>

          <div class="am-g am-margin-top-sm">
            <div class="am-u-sm-2 am-text-right">
              SEO 关键字
            </div>
            <div class="am-u-sm-4 am-u-end">
              <input name="keywords" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['keywords'];?>
" type="text" class="am-input-sm">
            </div>
          </div>

          <div class="am-g am-margin-top-sm">
            <div class="am-u-sm-2 am-text-right">
              SEO 描述
            </div>
            <div class="am-u-sm-4 am-u-end">
              <textarea name="abstract" rows="4"><?php echo $_smarty_tpl->tpl_vars['art']->value['abstract'];?>
</textarea>
            </div>
          </div>
      </div>
 <input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
    </form>
    <div class="am-margin">
    <button type="button" class="am-btn am-btn-primary hy-js-submit am-btn-xs">提交保存</button>
    
  </div>
  </div>
	</div>	
	 
	  <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

	<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/editor/kindeditor.js"></script>
	<script type="text/javascript">
	    hy_uploadimg('/goods',{},function(result,_this){
	    	if(typeof(result[0])!='undefined')
	    	{
	        	_this.parent().parent().find('#hy-thumb').attr('src',result[0]);
	        	_this.parent().parent().find('input.thumb').val(result[0]).focus();
	       }
	    })
	  hy_uploadimg('/goods',{ target:'.hy-js-attrimg'},function(result,_this){
	    	if(typeof(result[0])!='undefined')
	    	{
	        	_this.parent().parent().find('#hy-thumb').attr('src',result[0]);
	        	_this.parent().parent().find('input.attr-img').val(result[0]).focus();
	       }
	    })
	    hy_uploadimg('/gallery',{ target:'.hy-js-uploadimg2'},function(result){
	    	var html='';
	    	if(typeof(result[0])!='undefined')
	    	{
	    		for(res in result)
	    		{
	    			html+='<li class="hy-img-li"><div class="hy-img-container am-text-right"><span data-param ="{ hide:2}" class="hy-js-del am-icon-close"></span><img width="100%" src="'+result[res]+'"/></div><input name=photo type="hidden" value="'+result[res]+'"/></li>'
	    		}
	        	$('#hy-img-ul').append(html);
	        	
	        	if($('input[name=thumb]').val()=='')
	        	{
	        		$('#hy-thumb').attr('src',result[0]);
	        	    $('input[name=thumb]').val(result[0]);
	        	}
	       }
	    })
//	    
	    hy_submit('index.php?g=admin&m=goods&a=<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
');
		hungry.kindEditor.editor();
		$('.hy-js-searchgoods').click(function(e){
			e.preventDefault();
			var key=$('.hy-js-keywords').val();
			var cat_id=$('.hy-js-catid').val();
			var brand=$('.hy-js-brand').val();
			
				$.post('index.php?g=admin&m=goods&a=searchgoods',{ cat_id:cat_id,keyword:key,brand_id:brand},function(result)
				{
					if(result.error==0)
					{
						$('.hy-js-linkarea').html(result.data);
					}
					else
					{
						$('.hy-js-linkarea').html('');
						showMsg(result.content,result.error)
					}
				},'json')
			
		})
		$('.hy-js-selecttype').change(function(){
			var val=$(this).val();
			if(val>0)
			{
				$.post('index.php?g=admin&m=goods&a=selecttype',{ id:val},function(result)
				{
					if(result.error==0)
					{
						$('.hy-js-specarea').html(result.data);
					}
					else
					{
						showMsg(result.content,result.error)
					}
				},'json')
			}
		})

		$('.hy-js-selectattr').click(function(e){
		e.preventDefault();
		var _this=$(this);
		//点击保存后的回调方法
		var save=function(_iframe){
			var chk_value =[];  
			var group=[];
    		var _parent=_iframe.parents('body');
    		
    		_parent.find('.hy-js-chooseattr option:checked').each(function(){
    			var temp=[];
    			  temp.push($(this).html());
    			  temp.push($(this).val());
    			  group.push(temp);
    			})
    		var temp=[];
    		var pre_classname='';
    		_parent.find(".hy-js-attrlist input[name=^attr_]:checked").each(function(i){
    			var _this=$(this);
    			var classname=_this.attr('class');
    			var classnum=_parent.find('.'+classname).length-1;
    			if(pre_classname!=classname)
    			{
    				if(temp.length>0)
    				{
    					chk_value.push(temp); 
    				}
    				temp=[];
    				arr=[];
    				arr.push($(this).val());
    				arr.push($(this).attr('data-value'));
    				temp.push(arr);
    			}
    			else
    			{
    				arr=[];
    				arr.push($(this).val());
    				arr.push($(this).attr('data-value'));
    				temp.push(arr);
    			}
    			 pre_classname=classname;  
    		})
    		var html='';
            chk_value.push(temp); 
////console.log(group);
//  		console.log(chk_value);
//  		console.log(temp);
    		if(group.length>0)
    		{
    			for(var key in group)
    			{
    				for(var kk in chk_value[key])
    			   {
    			   		html+='<tr><td>'+group[key][0]+'<input type="hidden" name="attr_pid" value="'+group[key][1]+'"></td><td>';
    			   		html+=chk_value[key][kk][0]+'<input type="hidden" name="attr_name" value=\''+chk_value[key][kk][1]+'\'></td><td>';
					    html+='<div class="am-u-sm-6"><input type="text" name="attr_img" class="am-input-sm attr-img" value=""></div><div class="am-u-sm-2"><img id="hy-thumb" class="" style="height: 30px;"  src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/logo2.png" ></div><div class="am-u-sm-4"><button class="am-btn am-btn-primary am-btn-xs hy-js-attrimg" >上传</button></div></td>';
					    html+='<td><div class="am-btn-toolbar"><div class="am-btn-group am-btn-group-xs">';
						html+='<button data-hide="4" class="am-btn am-btn-default am-btn-xs am-text-danger hy-js-delattrdata"><span class="am-icon-trash-o"></span> 删除</button></div></div></td></tr>';
    			   }
    				
    				
    			}
    		}
    		$('.hy-js-attrdata').prepend(html);
		}
		hy_winOpen('index.php?g=admin&m=goods&a=selectattr',{ height:'70%',width:'50%',save:save,_this:_this})
		})
		
		 $('.hy-js-delattrdata').live('click',function(e){
				    	e.preventDefault();
				    	var _this=$(this);
				        var hide=$(this).attr('data-hide');
				     	var parent='';
				    	var id=_this.attr('data-id');
				    	
				    		 if(hide)
					        {
						       for(i=0;i<hide;i++)
				              {
					               parent+='.parent()';
					          }
					        }
					        eval('_this'+parent+'.remove()');
				    	
				    })
	</script>
	</body>
</html>
<?php }} ?>
